var App = require('app');

App.AppSessionController = Em.ObjectController.extend({
	submit: function() {
		var me = this;
		
		var filedSets = $("#form_canvas_view .fieldset");
		Valid.data(filedSets);
		
		$("#displayForm").validate({
			showErrors: Util.showErrors,
			onkeyup: function(element) { },
			onfocusout: function(element) { },
			ignore: [],
		});
		if (!$("#displayForm").valid()) {
			return false;
		}
		$("#displayForm").ajaxSubmit(function(msg) {
			new $.Zebra_Dialog('<strong>Sucess</strong> to submit the data!', {
				    'buttons':  false,
				    'modal': false,
				    'position': [],
				    'auto_close': 1000
				});
	    });	

	    return false;
	},
});